Producer Consumer Problem Using java threads